package com.cxs.controller;

import com.cxs.service.DistrictService;
import cxs.utils.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 * @Author:cxs
 * @Date:2021/9/30  11:35
 * @Version 1.0
 * @Motto:放下杂念,只为迎接明天更好的自己
 * */
@RestController
@RequestMapping("/district")
@CrossOrigin(allowCredentials = "true")
public class DistrictController {
    @Autowired
    private DistrictService districtService;

    @RequestMapping("/list")
    public Object list(){
        return Result.OK("请求成功",districtService.list());
    }
}
